package lambda;

import java.io.File;
import java.io.FileFilter;

public class LambdaDemo1 {
    public static void main(String[] args) {
      
        FileFilter filter=new FileFilter() {
            public boolean accept(File pathname) {
                return pathname.getName().endsWith("o");

            }
        };
        FileFilter filter1=(File file)->{
          return file.getName().endsWith("o");
        };

        FileFilter filter2=(sadsadf)->{
            return sadsadf.getName().endsWith("o");
        };
        FileFilter filter3=(efsa)->efsa.getName().startsWith("o");

        FileFilter filter4=z->z.getName().endsWith("o");

        File dir=new File("./src/main/java/file");

        File[] sub=dir.listFiles(z->z.getName().startsWith("D"));
    }
}
